<!DOCTYPE html>
<html>
<head>
    <title>{% block title %}{% endblock %} - Flask登录系统</title>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
</head>
<body>
    <div class="container mt-5">
        <!-- 闪现消息 -->
        {% with messages = get_flashed_messages(with_categories=true) %}
            {% if messages %}
                {% for category, message in messages %}
                    <div class="alert alert-{{ category }} alert-dismissible fade show">
                        {{ message }}
                        <button type="button" class="close" data-dismiss="alert">&times;</button>
                    </div>
                {% endfor %}
            {% endif %}
        {% endwith %}

        <!-- 内容块 -->
        {% block content %}{% endblock %}
    </div>
</body>
</html>
